The invention relates to a decoding apparatus and a decoding method for performing decoding of, for example, MPEG2 and, more particularly, to a reduction of a memory capacity of an image memory which is used for motion prediction.
A satellite digital television broadcasting for broadcasting a digital video signal by using a satellite has been started. A ground wave digital television broadcasting for broadcasting a digital video signal by using a ground wave is being developed. In the digital television broadcasting, it is expected to perform various services such as high definition television broadcasting, multichannel broadcasting, multimedia broadcasting, and the like.
In the digital television broadcasting, for example, MPEG2 (Moving Picture Experts Group) 2 is used as an image compression system. According to MPEG2 system, a video signal is compression encoded by a motion compensation predictive coding and a DCT (Discrete Cosine Transformation). In the MPEG2 system, three kinds of picture planes called an I (Intra) picture, a P (Predictive) picture, and a B (Bidirectionally Predictive) picture are transmitted. In the I picture, DCT coding is performed by using pixels of the same frame. In the P picture, DCT coding using a motion compensation prediction is performed with reference to the I picture or P picture which has already been encoded. In the B picture, DCT coding using a motion prediction is performed with reference to the I pictures or P pictures before and after the target picture.
A decoding circuit of MPEG2 is provided for a digital television receiver for receiving a digital television broadcasting which is transmitted by using such an MPEG2 system. The decoding circuit of MPEG2 can be constructed as shown in, for example, FIG. 1.
In FIG. 1, a bit stream of MPEG2 is supplied to an input terminal 101. The bit stream is once accumulated in a buffer memory 102.
An output of the buffer memory 102 is supplied to a variable length decoding circuit 103. Decoding is performed on a macroblock unit basis in the variable length decoding circuit 103. Coefficient data of DCT and a motion vector are outputted from the variable length decoding circuit 103. Further, various control data showing a frame frequency of the video signal and data such as predicting mode, quantization scale, and the like are outputted from the variable length decoding circuit 103.
The DCT coefficient data comprising (8xc3x978) pixels is supplied to an inverse quantizing circuit 104. The quantization scale of the inverse quantizing circuit 104 is set in accordance with quantization scale information from the variable length decoding circuit 103. Motion vector information and predicting mode information are supplied to a motion compensating circuit 107.
The DCT coefficient data is inversely quantized by the inverse quantizing circuit 104. An output of the inverse quantizing circuit 104 is supplied to an IDCT circuit 105. An output of the IDCT circuit 105 is supplied to an adding circuit 106. An output of the motion compensating circuit 107 is supplied to the adding circuit 106.
An image memory 108 holds video images of two frames for a reference picture plane and one field image for converting a frame image in a macroblock into a field when the B picture is outputted.
In the I picture, since the DCT coding is performed by using the pixels of the same frame, in case of the I picture, image data of a picture plane of one frame is obtained from the IDCT circuit 105. The image data is outputted from an output terminal 111 through the adding circuit 106 and image memory 108. The image data in this instance is accumulated as data of the reference picture plane into the image memory 108.
In the P picture, the DCT coding using the motion compensation prediction is performed with reference to the I picture or P picture. Therefore, differential data between the target picture plane and the reference picture plane is outputted from the IDCT circuit 105. Data of the reference picture plane has been accumulated in the image memory 108. The motion vector is supplied from the variable length decoding circuit 103 to the motion compensating circuit 107. In case of decoding the P picture, the image of the reference frame from the image memory 108 is motion compensated by the motion compensating circuit 107 and supplied to the adding circuit 106. The adding circuit 106 adds the data of the motion compensated reference image and the differential data from the IDCT circuit 105. Thus, data of a picture plane of one frame is obtained. The image data at this time is stored as data of the reference picture plane into the image memory 108.
In the B picture, the DCT coding using the motion prediction is performed with reference to the I pictures or P pictures before and after the target picture. Therefore, differences between the B picture plane and the reference picture planes before and after the target picture plane are outputted from the IDCT circuit 105. The data of the reference picture planes before and after the target picture plane has been stored in the image memory 108. In case of decoding the B picture, the images of the reference frames before and after the target picture plane from the image memory 108 are motion compensated by the motion compensating circuit 107 and supplied to the adding circuit 106. The adding circuit 106 adds the data of the motion compensated reference images before and after the target picture plane and the differential data from the IDCT circuit 105. Thus, data of a picture plane of one frame is obtained.
As mentioned above, as for the digital video signal of the MPEG2 system, there are the I picture, P picture, and B picture. In the P picture and B picture, the image data stored in the image memory 108 is used as data of the reference images. Therefore, as an image memory, a memory capacity of at least two frames is necessary. Further, a memory capacity of one field is necessary to convert a frame image in the macroblock into a field picture plane when the image of the B picture is outputted. Therefore, a capacity of at least (2 frames+1 field) is necessary as a capacity of the image memory. For example, in case of decoding the picture plane of a high definition television broadcasting of (1920 pixelsxc3x971080 lines), a memory capacity of about 80 Mbits or more is necessary. Since the memory capacity increases as mentioned above, costs increase and it is difficult to miniaturize.
Particularly, the use of a DRAM as such an image memory is considered. Although the DRAM of 64 Mbits has been spread, since the memory capacity that is required as a capacity of the image memory exceeds 64 Mbits, a desired image memory cannot be constructed if one DRAM of 64 Mbits is used. If two DRAMs of 64 Mbits are used or a DRAM of 128 Mbits is used, the memory capacity becomes in vain.
It is, therefore, an object of the invention to provide a decoding apparatus and a decoding method which can reduce a capacity of an image memory for accumulating reference picture planes which are used for a motion compensation prediction and can realize a miniaturization, a light weight, and a reduction of costs.
According to the invention, there is provided a decoding apparatus comprising: data input means for inputting image data compressed by a motion compensation predictive coding and a DCT (Discrete Cosine Transformation); variable length decoding means for decoding various parameters and quantization DCT coefficients from the data input means; inverse quantizing means for inversely quantizing the quantization DCT coefficients; inverse DCT means for inversely DCT transforming the DCT coefficients which were inversely quantized; motion compensation predicting means for obtaining a motion compensation predictive value; arithmetic operating means for adding reference data which was motion compensated by the motion compensation predicting means and an output of the inverse DCT means; an image memory for storing the reference data which is used for the motion compensation prediction and data for display; and data output means for outputting decoded image data, wherein data compressing means for compressing an amount of data which is stored in the image memory is provided at the front stage of the image memory, and data decompressing means for decompressing the compression data read out from the image memory to the original data is provided at the post stage of the image memory.
According to the invention, there is provided a decoding method of decoding image data compressed by a motion compensation predictive coding and a DCT (Discrete Cosine Transformation), comprising the steps of: obtaining various parameters and quantization DCT coefficients from the image data by variable length coding; inversely quantizing the quantization DCT coefficients; inversely DCT transforming the DCT coefficients which were inversely quantized; performing the motion compensation prediction on the basis of the predetermined parameters which were variable length decoded and outputting reference data; arithmetically operating the outputted reference data and the inversely DCT transformed output; compressing a result of the arithmetic operation and storing it into a reference image memory; and decompressing the data stored in the reference image memory and performing a motion compensation.
The image data is compressed when data of a reference picture plane is stored into the image memory which is used for the motion compensation prediction. Thus, a memory capacity of the image memory which is used for the motion compensation prediction can be reduced, a circuit scale can be reduced, and costs can be shaved. In this instance, since the compression of the image data is performed independently on a unit basis of a block layer of the DCT, it can be matched with the DCT block and successive processes can be performed.